package com.example.leetdemo.process;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.JSONSerializer;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.SerializeWriter;
import com.alibaba.fastjson.serializer.SerializerFeature;

import java.util.concurrent.atomic.AtomicInteger;

import static com.alibaba.fastjson.serializer.SerializerFeature.WriteMapNullValue;

public class Solution824 {

    public String toGoatLatin(String sentence) {
        String[] ss = sentence.split(" ");
        for (int i = 0; i < ss.length; i++) {
//            if (ss[i].charAt(0) != -1 )
        }
        return "";
    }

    public static void main(String[] args) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("s", null);
        jsonObject.put("b", "");
        jsonObject.put("a", new JSONArray());
        System.err.println(JSON.toJSONString(jsonObject, WriteMapNullValue));
        System.err.println(toJSONString(jsonObject));
    }

    public static String toJSONString(JSONObject jsonObject) {
        AtomicInteger atomicInteger = new AtomicInteger();
        atomicInteger.addAndGet(0);
        atomicInteger.getAndIncrement();
        SerializeWriter out = new SerializeWriter(WriteMapNullValue);
        String var2;
        try {
            (new JSONSerializer(out)).write(jsonObject);
            var2 = out.toString();
        } finally {
            out.close();
        }
        return var2;
    }
}
